<template>
	<view v-if="user" class="u-p-t-20">
		<view :class="['u-p-28 bg-white',customClass]">
			<view v-if="!hideTitle" class="border-title u-flex u-row-between">
				<text>发布者</text>

				<view v-if="report" @click="$emit('onReport')" class="u-flex">
					<image style="width:20px;height: 20px;" src="@/static/index/jubao.png"></image>
					<text class="u-font-14 color-80 u-m-l-8">
						举报
					</text>
				</view>


			</view>
			<view class="u-flex u-m-t-14 u-p-b-14">
				<u-image shape="circle" width="50px" height="50px" :src="user.avatar">
				</u-image>
				<view class="u-m-l-34 ">
					<view class="u-font-16 color-3">
						{{user.nickname}}
					</view>
					<view class="u-flex u-font-10 u-m-t-14 color-80">
						<u-image v-if="user.sex === 1" class="u-m-r-8" width="14px" height="14px"
							src="@/static/index/nan.png">
						</u-image>
						<u-image v-if="user.sex === 2" class="u-m-r-8" width="14px" height="14px"
							src="@/static/index/nv.png">

						</u-image>
						<text class="u-m-r-16">{{user.age}}岁</text>
						<text class="u-m-r-30">{{user.horoscope}}</text>
						<text>{{user.last_online}}</text>
					</view>
				</view>
			</view>
			<!-- 首页列表详情-需要展示联系方式 -->
			<contact-way v-if="info" :info="info"></contact-way>
		</view>
	</view>
</template>

<script>
	import contactWay from '@/components/contactWay/contactWay.vue';

	export default {
		props: ['user', 'info', 'hideTitle', 'customClass', 'report'],
		name: "publisher",
		components: {
			contactWay
		},
		data() {
			return {

			};
		}
	}
</script>

<style lang="scss" scoped>
	.border-title {
		&::before {
			height: 70%;
		}
	}
</style>
